fix(elixir): keep ssh retries in orchestrator#54
Merged
frantic-openai merged 1 commit intomainfrom Mar 19, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR moves SSH retry/failover ownership out of AgentRunner and into the orchestrator by ensuring a single agent run stays pinned to one selected SSH host. This prevents a single worker lifetime from silently hopping to another host (which could bypass per-host caps and risk duplicate side effects).
Changes:
- Remove
AgentRunner’s internal multi-host failover loop; it now runs on exactly oneworker_host. - Introduce
selected_worker_host/2to pick a single host (preferred host if provided, otherwise first configured host / local). - Add a regression test asserting a startup failure on one host is surfaced and does not fall through to another host.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
elixir/lib/symphony_elixir/agent_runner.ex |
Removes cross-host retry logic and pins each run to a single selected worker_host. |
elixir/test/symphony_elixir/core_test.exs |
Adds a regression test that verifies startup failures don’t trigger silent host hopping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
frantic-openai
approved these changes
Mar 19, 2026
slusset
pushed a commit
to slusset/symphony
that referenced
this pull request
Mar 22, 2026
#### Context SSH failover currently happens inside `AgentRunner`, which can bypass per-host caps and rerun a ticket on a second host after the first host already started setup. #### TL;DR *Keep each worker run on one SSH host and let the orchestrator own retries.* #### Summary - Remove `AgentRunner`'s internal cross-host failover loop - Keep a worker lifetime pinned to one selected SSH host - Add a regression test proving startup failure on one host does not fall through to another #### Alternatives - Keep internal failover and classify retryable errors, but that duplicates orchestrator scheduling logic - Only patch per-host cap enforcement, but invisible cross-host reruns would still risk duplicate side effects #### Test Plan - [x] `make -C elixir all` - [x] `cd elixir && mise exec -- mix test test/symphony_elixir/core_test.exs:1167 test/symphony_elixir/core_test.exs:1237 test/symphony_elixir/core_test.exs:1337 --seed 0`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
SSH failover currently happens inside
AgentRunner, which can bypass per-host caps and rerun a ticket on a second host after the first host already started setup.TL;DR
Keep each worker run on one SSH host and let the orchestrator own retries.
Summary
AgentRunner's internal cross-host failover loopAlternatives
Test Plan
make -C elixir allcd elixir && mise exec -- mix test test/symphony_elixir/core_test.exs:1167 test/symphony_elixir/core_test.exs:1237 test/symphony_elixir/core_test.exs:1337 --seed 0